# 课本P110
# vowels04：给定一个单词时，它会为找到的各个元音生成一个频度计数。
vowels = ['a','e','i','o','u']
word = input("provide a word to search for vowels:")
found = {} #创建空字典
found['a'] = 0
found['i'] = 0
found['o'] = 0
found['u'] = 0
found['e'] = 0
# 用for循环设置增加值
for  letter in word:
    if letter in vowels:
        found[letter] +=1
# 使用items函数：将字典中的键和值对一起返回出来
for k,v in sorted(found.items()):
    print(k,'was found',v,'time(s).')